import {fromJS} from 'immutable';
import {Utils} from 'fe-lib';
import {asyncHandler, initStatus} from 'shared/utils/reducerUtil';
import * as actionTypes from '../consts';

const {createReducer} = Utils;
const {key} = actionTypes.key;
const initialState = fromJS({
  [key]: initStatus({}),
});

const handlers = {
  [actionTypes.ACTION_NAME]: asyncHandler(key),
};

export default createReducer(initialState, handlers);
